package me.firstapp.service.system;

import java.util.List;
import java.util.Map;

import me.firstapp.common.utils.Page;
import me.firstapp.module.system.ApiClient;

public interface ApiClientService {
	/**
	 * 通过key获取Api客户
	 * 
	 * @param apiKey
	 */
	ApiClient findApiClientByKey(String apiKey);

	/**
	 * 通过id获取Api客户
	 * 
	 * @param id
	 * @return
	 */
	ApiClient findApiClientById(Long id);

	/**
	 * 新增Api客户
	 * 
	 * @param email
	 * @param description
	 * @return
	 */
	ApiClient addApiClient(String email, String description);

	/**
	 * 更新Api客户
	 * 
	 * @param id
	 * @param yesCounts
	 * @param description
	 * @param status
	 * @return
	 */
	ApiClient updateApiClient(Long id, Long yesCounts, String description, Integer status);

	/**
	 * 分页查询Api客户
	 * 
	 * @param pageNo
	 * @param pageSize
	 * @param searchParams
	 * @param sortParam
	 * @param sortType
	 * @return
	 */
	Page<ApiClient> findApiClientPage(Integer pageNo, Integer pageSize, Map<String, Object> searchParams,
			String sortParam, String sortType);

	/**
	 * 列表查询Api客户
	 * 
	 * @return
	 */
	List<ApiClient> findAll();
}
